package com.retail.bbq.cola.config;

import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.security.keyvault.secrets.SecretClient;
import com.azure.security.keyvault.secrets.SecretClientBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
//@ConfigurationProperties(prefix = "app")
public class AzureKeyVaultConfig {

//    @Value("${spring.cloud.azure.keyvault.secret.uri}")
//    private String vaultUrl;
//
//    @Bean
//    public SecretClient createSecretClient() {
//        return new SecretClientBuilder()
//                .vaultUrl(vaultUrl)
//                .credential(new DefaultAzureCredentialBuilder().build())
//                .buildClient();
//    }

//    private String secretFromKeyVault;
//
//    // Getter 和 Setter
//    public String getSecretFromKeyVault() {
//        return secretFromKeyVault;
//    }
//
//    public void setSecretFromKeyVault(String secretFromKeyVault) {
//        this.secretFromKeyVault = secretFromKeyVault;
//    }

}
